import io from 'socket.io-client'


const socket = io.connect('ws://localhost:4000',{
    path:'/userId'
})

socket.emit('join-room')
socket.emit('sendMsg',{name:'zxc'})
console.log('客户端向服务器发送的消息',{name:'zxc'})


socket.on('receiveMsg',function (data) {
    console.log('客户接收服务器发送的消息',data)
})


